:root {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #fafafa;
}

body * + * {
    margin-top: 0.6em;
}

.clearfix::after {
    display: block;
    content:" ";
    clear: both;
}

.header {
    background-color: #444444;
    padding: 0.4em 1em;
}

.header > .title {
    color: #fff;
    font-size: 1.5em;
    margin: 0.2em 0;
}

.container {
    max-width: 800px;
    width: 80vw;
    margin: 0.5em auto;
}

.flex {
    display: flex;  
}

.flex > * + * {
    margin-top: 0;
    margin-left: 0.6em;
}

.tile {
    padding: 0.8em 1em;
    background-color: #fff;
    border-radius: 0.5em;
}

.col {
    flex: 1;
}

.canvas {
    position: relative;
    min-height: 4em;
    margin:0;
}

.canvas * {
    margin: inherit;
}

.top,
.front,
.right {
    display: block;
    position: absolute;
    border-color: #333;
    border-style: solid;
    background-color: #aaa;
}

.front{
    width: 3em;
    height: 3em;
    text-align: center;
    top: 1em;
    left: 0;
    border-width: 1px 1px 2px 2px;
}

.top {
    top: 0em;
    left: 0;
    width: 3em;
    height: 1em;
    transform: skew(-45deg, 0deg) translate(0.5em, 0);
    border-width: 2px 1px 1px 2px;
}

.right {
    top:1em;
    left:3em;
    width: 1em;
    height: 3em;
    transform: skew(0deg, -45deg) translate(0, -0.5em);
    border-width: 1px 2px 2px 1px;
}

.bg-red {
    background-color: red;
}
.bg-blue {
    background-color: blue;
}
.bg-green {
    background-color: green;
}
.bg-white {
    background-color: #fff;
}
.bg-yellow {
    background-color: yellow;
}
.bg-orange {
    background-color: orange;
}

.answer {
    padding: 0.5em 1em;
    min-height: 2em;
}

.choices-label + .choices {
    margin-top: 0.4em;
}

button {
    padding: 0.5em 1em;
    cursor: pointer;
    font-size: inherit;
    background-color: #505050;
    color: #fff;
    border-style: none;
    border-radius: 0.4em;
}

button + button {
    margin-left: 0.5em;
}

.modal {
    display: none;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgb(0, 0, 0, 0.2);
    z-index: 1;
}

.modal-body {
    position: fixed;
    top: 3em;
    right: 20%;
    left: 20%;
    background-color: #fff;
    padding: 1em 1.5em;
    overflow: auto;
    z-index: 2;
}

.modal-header {
    border-bottom: 1px solid #eeeeee;
    padding: 0 0.3em;
}

.modal-header > .title {
    margin: 0.5em 0;
}

.modal-close {
    position: absolute;
    top: .3em;
    right: .3em;
    padding: 0.3em;
    cursor: pointer;
    font-size: 2em;
    height: 1em;
    width: 1em;
    text-indent: 10em;
    overflow: hidden;
    border: 0;
}

.modal-close::after {
    position: absolute;
    line-height: 0.5;
    top: 0.2em;
    left: 0.1em;
    text-indent: 0;
    content: "\00D7";
}

.modal-footer {
    border-top: 1px solid #eeeeee;
}

.modal .modal-cancel{
    background-color: #fff;
    border: 1px solid #cccccc;
    color: #888888;
}

.modal-main {
    overflow-y: auto;
    max-height: 60vh;
}

.modal-main * {
    margin: 0.4em 0;
}

.modal-main h4 {
    margin: 0.6em 0 0.4em 0;
}

.modal-main span + input {
    margin-left: 1em;
}

select {
    font-size: inherit;
    padding: 0.2em 0.5em;
}

.code-box {
    padding: 0.5em;
}

.code-grid {
    display: grid;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
}

.code-grid * {
    margin: 0;
    padding: 0.4em;
    text-align: center;
}

.code-grid > .code-show {
    border: 1px solid #222;
}

.code-grid > .code-adjacent{
    border: 1px dashed #666;
    color: #444;
}

.code-input {
    border-style: none;
    width: 95%;
    height: 95%;
    margin: auto;
    padding: 0.2em;
    font-size: inherit;
    text-align: center;
    cursor: pointer;
}
/* .code-main {
    flex: 2;
} */
/* .top{
    width: 80px;
    height: 20px;
    background-color:#dddddd;
    transform:skew(-45deg,0deg) translate(10px,0px);
}
.front{
    width: 80px;
    height: 80px;
    background-color: #aaaaaa;
    float: left;
}
.right{
    width: 20px;
    height: 80px;
    background-color:#888888;
    float:left;
    transform:skew(0deg,-45deg) translate(0px,-10px);
} */